package arsmodeller.editpolicies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;

import arsmodeller.commands.ThingDeleteCommand;
import arsmodeller.model.Thing;

public class ThingComponentEditPolicy extends ComponentEditPolicy {
	@Override
	protected Command createDeleteCommand(GroupRequest deleteRequest) {
		ThingDeleteCommand thingDeleteCommand = new ThingDeleteCommand();
		thingDeleteCommand.setThing((Thing) getHost().getModel());
		return thingDeleteCommand;
	}
}
